package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the EXAM_PAPER database table.
 * 
 */
@Entity
@Table(name="EXAM_PAPER")
@NamedQuery(name="ExamPaper.findAll", query="SELECT e FROM ExamPaper e")
public class ExamPaper implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="EXAM_PAPER_EPID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EXAM_PAPER_EPID_GENERATOR")
	@Column(name="EP_ID")
	private long epId;

	@Column(name="CLASS_SJ_NAME")
	private String classSjName;

	@Column(name="EP_DATE")
	private Timestamp epDate;

	@Column(name="EP_DEFEN")
	private BigDecimal epDefen;

	@Column(name="EP_ENDTIME")
	private Timestamp epEndtime;

	@Column(name="EP_GRADE")
	private String epGrade;

	@Column(name="EP_HAVE_TEST")
	private BigDecimal epHaveTest;

	@Column(name="EP_NUMBER_QUESTION")
	private BigDecimal epNumberQuestion;

	@Column(name="EP_NUMBER_TOTAL")
	private BigDecimal epNumberTotal;

	@Column(name="EP_PERSON")
	private String epPerson;

	@Column(name="EP_SHICHANG")
	private BigDecimal epShichang;

	@Column(name="EP_STARTTIME")
	private Timestamp epStarttime;

	@Column(name="EP_STATE")
	private String epState;

	@Column(name="EP_TAKE_MEASURE")
	private BigDecimal epTakeMeasure;

	@Column(name="EP_TOTAL")
	private BigDecimal epTotal;

	@Column(name="EP_WAY")
	private String epWay;

	//bi-directional many-to-one association to ClassDy
	@OneToMany(mappedBy="examPaper")
	@JSONField(serialize=false)
	private List<ClassDy> classDies;

	//bi-directional many-to-many association to ExamArrange
	@ManyToMany
	@JoinTable(
		name="RELATIONSHIP_37"
		, joinColumns={
			@JoinColumn(name="EP_ID")
			}
		, inverseJoinColumns={
			@JoinColumn(name="ARRANGE_ID")
			}
		)
	@JSONField(serialize=false)
	private List<ExamArrange> examArranges;

	//bi-directional many-to-one association to QuestionBank
	@ManyToOne
	@JoinColumn(name="QU_ID")
	private QuestionBank questionBank;

	//bi-directional many-to-one association to ExamSite
	@OneToMany(mappedBy="examPaper")
	@JSONField(serialize=false)
	private List<ExamSite> examSites;

	//bi-directional many-to-many association to QuestionHhy
	@ManyToMany(mappedBy="examPapers")
	@JSONField(serialize=false)
	private List<QuestionHhy> questionHhies;

	public ExamPaper() {
	}

	public long getEpId() {
		return this.epId;
	}

	public void setEpId(long epId) {
		this.epId = epId;
	}

	public String getClassSjName() {
		return this.classSjName;
	}

	public void setClassSjName(String classSjName) {
		this.classSjName = classSjName;
	}

	public Timestamp getEpDate() {
		return this.epDate;
	}

	public void setEpDate(Timestamp epDate) {
		this.epDate = epDate;
	}

	public BigDecimal getEpDefen() {
		return this.epDefen;
	}

	public void setEpDefen(BigDecimal epDefen) {
		this.epDefen = epDefen;
	}

	public Timestamp getEpEndtime() {
		return this.epEndtime;
	}

	public void setEpEndtime(Timestamp epEndtime) {
		this.epEndtime = epEndtime;
	}

	public String getEpGrade() {
		return this.epGrade;
	}

	public void setEpGrade(String epGrade) {
		this.epGrade = epGrade;
	}

	public BigDecimal getEpHaveTest() {
		return this.epHaveTest;
	}

	public void setEpHaveTest(BigDecimal epHaveTest) {
		this.epHaveTest = epHaveTest;
	}

	public BigDecimal getEpNumberQuestion() {
		return this.epNumberQuestion;
	}

	public void setEpNumberQuestion(BigDecimal epNumberQuestion) {
		this.epNumberQuestion = epNumberQuestion;
	}

	public BigDecimal getEpNumberTotal() {
		return this.epNumberTotal;
	}

	public void setEpNumberTotal(BigDecimal epNumberTotal) {
		this.epNumberTotal = epNumberTotal;
	}

	public String getEpPerson() {
		return this.epPerson;
	}

	public void setEpPerson(String epPerson) {
		this.epPerson = epPerson;
	}

	public BigDecimal getEpShichang() {
		return this.epShichang;
	}

	public void setEpShichang(BigDecimal epShichang) {
		this.epShichang = epShichang;
	}

	public Timestamp getEpStarttime() {
		return this.epStarttime;
	}

	public void setEpStarttime(Timestamp epStarttime) {
		this.epStarttime = epStarttime;
	}

	public String getEpState() {
		return this.epState;
	}

	public void setEpState(String epState) {
		this.epState = epState;
	}

	public BigDecimal getEpTakeMeasure() {
		return this.epTakeMeasure;
	}

	public void setEpTakeMeasure(BigDecimal epTakeMeasure) {
		this.epTakeMeasure = epTakeMeasure;
	}

	public BigDecimal getEpTotal() {
		return this.epTotal;
	}

	public void setEpTotal(BigDecimal epTotal) {
		this.epTotal = epTotal;
	}

	public String getEpWay() {
		return this.epWay;
	}

	public void setEpWay(String epWay) {
		this.epWay = epWay;
	}

	public List<ClassDy> getClassDies() {
		return this.classDies;
	}

	public void setClassDies(List<ClassDy> classDies) {
		this.classDies = classDies;
	}

	public ClassDy addClassDy(ClassDy classDy) {
		getClassDies().add(classDy);
		classDy.setExamPaper(this);

		return classDy;
	}

	public ClassDy removeClassDy(ClassDy classDy) {
		getClassDies().remove(classDy);
		classDy.setExamPaper(null);

		return classDy;
	}

	public List<ExamArrange> getExamArranges() {
		return this.examArranges;
	}

	public void setExamArranges(List<ExamArrange> examArranges) {
		this.examArranges = examArranges;
	}

	public QuestionBank getQuestionBank() {
		return this.questionBank;
	}

	public void setQuestionBank(QuestionBank questionBank) {
		this.questionBank = questionBank;
	}

	public List<ExamSite> getExamSites() {
		return this.examSites;
	}

	public void setExamSites(List<ExamSite> examSites) {
		this.examSites = examSites;
	}

	public ExamSite addExamSite(ExamSite examSite) {
		getExamSites().add(examSite);
		examSite.setExamPaper(this);

		return examSite;
	}

	public ExamSite removeExamSite(ExamSite examSite) {
		getExamSites().remove(examSite);
		examSite.setExamPaper(null);

		return examSite;
	}

	public List<QuestionHhy> getQuestionHhies() {
		return this.questionHhies;
	}

	public void setQuestionHhies(List<QuestionHhy> questionHhies) {
		this.questionHhies = questionHhies;
	}

}